<?php
/**
 * @package pmapi
 * @copyright Copyright (c)2014 Enrico Fagnoni
 * @license GNU General Public License version 3, or later
 *
 * @since 1.0.0
 */
 
defined('_JEXEC') or die;

jimport( 'joomla.application.component.view');

class HomepageView extends JViewLegacy
{
    public function getId($default=null)
    {
         return JFactory::getApplication()->input->get('id',$default);
    } 
    
        
    public function getURI()
    {
         return UriHelper::mkHtmlURL($this->getName(),$this->getId());
    } 
  
    
    public function getDataURI()
    {
         return UriHelper::mkDataURL($this->getName(),$this->getId());
    }
    
        
    public function __construct( $config = array())
    {
        parent::__construct($config);
        
        JFactory::getDocument()
            ->setLink($uri=$this->getURI())
            ->addHeadLink( $uri, 'alternate', 'rel', 
                array('type' => 'text/turtle', 'title' => 'RDF turtle representation') );
    }
 
}